package com.yswy.backstage.entity.user;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统内部user，非customer
 *
 * @author linlifu
 * @date 2020/01/07
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("员工")
@TableName(value = "sys_user")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户 名称")
    private String userName;
    @ApiModelProperty("用户 密码")
    private String pwd;
    @ApiModelProperty("用户 电话")
    private String userPhone;
    @ApiModelProperty("token")
    private String authToken;

    /**
     * token过期时间
     */
    @ApiModelProperty("过期时间")
    private Date expireTime;
    @ApiModelProperty("性别")
    private Integer sex;
    @ApiModelProperty("创建人")
    private String createBy;
    @ApiModelProperty("修改人")
    private String updateBy;


    @TableField(fill = FieldFill.UPDATE, update = "now()")
    @ApiModelProperty("修改时间")
    private Date updateTime;

    @TableField(fill = FieldFill.INSERT, update = "now()")
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("冻结状态 true:冻结 false:不冻结")
    private Boolean freezingSatus;
    @ApiModelProperty("")
    private Integer isAgreement = 0;
    @ApiModelProperty("")
    private Boolean inside;

    @TableField(exist = false)
    @ApiModelProperty("是否管理员")
    private Integer isAdmin;
}
